package services;

import dao.IContract;
import factory.ContractDaoFactory;
import vo.Contract;

import java.util.List;

public class ContractServicempl implements IContractService{
   IContract iContract=ContractDaoFactory.getInstance();//获取对应的(客户操作类)接口对象,向上转型
    @Override
    public boolean add(Contract contract) {
        return iContract.add(contract);
    }

    @Override
    public boolean delete(Contract contract) {
        return iContract.delete(contract);
    }

    @Override
    public boolean modify(Contract contract) {
        return iContract.modify(contract);
    }

    @Override
    public Contract getcustombyid(int id) {
        return iContract.getcustombyid(id);
    }

    @Override
    public List<Contract> getall() {
        return iContract.getall();
    }
}
